package com.aliwo.service.impl;

import com.aliwo.dao.RedPacketDao;
import com.aliwo.entity.RedPacket;
import com.aliwo.service.RedPacketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: xuyayuan
 * @Date: 2023/10/31
 * @Description:
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RedPacketServiceImpl implements RedPacketService {

    @Autowired
    private RedPacketDao redPacketDao;

    @Override
    public RedPacket getRedPacket(Long id) {
        return redPacketDao.getRedPacket(id);
    }

    @Override
    public int decreaseRedPacket(Long id) {
        return redPacketDao.decreaseRedPacket(id);
    }

}
